package com.zdya.combatdocuments.config;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

@Component
public class MyAutofill implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
       // this.strictInsertFill(metaObject, "type", 1, Integer.class); // 起始版本 3.3.3(推荐)
        this.strictInsertFill(metaObject, "type", Integer.class, 1);
        this.strictInsertFill(metaObject, "status", Integer.class, 0);
    }

    @Override
    public void updateFill(MetaObject metaObject) {

    }
}
